package com.etrans.baf.analyse.task.track.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.etrans.baf.analyse.task.track.service.TouristService;
import com.etrans.baf.analyse.util.DateUtils;

/** 
 * @author liushuli
 * @version 创建时间：2017年9月06日 下午2:57:08 
 */

@Component("touristAnalyse")
public class TouristAnalyse{
	@Autowired
	private TouristService touristService;
		
	static final Logger logger = LoggerFactory.getLogger(TouristAnalyse.class);
	
	public void timer(){ 
		analyse();
	}
	public void timer1(){ 
		try {
			String analyse_date = DateUtils.getAnalyseDate(null,0);
			touristService.enterpriseAnalyse(analyse_date);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public void timer2(){ 
		try {
			touristService.areaInout(null);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void analyse(){
		try {
			String analyse_date = DateUtils.getAnalyseDate(null,0);
			touristService.touristInsert(analyse_date);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
